package lib;

public class CartesianLine implements GeometricLine {

	public CartesianLine(CartesianPoint ptA, CartesianPoint ptB) {
		pointA = ptA;
		pointB = ptB;
	}

	/**
	 * Returns the length of this line
	 */
	public double getLength() {
		return CartesianPoint.distance(pointA, pointB);
	}
	
	public String toString() {
		String output;
		output = "[" + pointA + "," + pointB + "]";
		return output;
	}

	CartesianPoint pointA;
	CartesianPoint pointB;
}
